package com.bw.auth.controller;

import com.bw.auth.service.AuthService;
import com.bw.common.domain.Admin;
import com.bw.common.domain.response.AdminResponse;
import com.bw.common.result.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @Author：HaoYunde
 * @Package：com.bw.auth.controller
 * @Project：hyd-boot
 * @name：AuthController
 * @Date：2024/6/17 9:00
 */
@RestController
public class AuthController {
    @Autowired
    public AuthService authService;


    @PostMapping("/dologin")
    public Result<AdminResponse> dologin(@RequestBody Admin admin){
         Result<AdminResponse> result=authService.dologin(admin);
         return result;
    }

    @GetMapping("/info")
    public Result<Admin> info(){
        Result<Admin> result= authService.info();
        return result;
    }


}
